﻿package com.events{

	import flash.events.Event;

	public class MediaEvent extends Event {
		
		public static  const START:String = "mediaStart";
		public static  const STOP:String = "mediaStop";
		public static  const PROGRESS:String = "mediaProgess";
		public static  const COMPLETE:String = "mediaComplete";
		public static  const METADATA:String = "mediaMetadata";
		public static  const LOAD:String = "mediaLoad";
		
		private var _width:Number;
		private var _height:Number;
		private var _position:Number;
		private var _duration:Number;
		
		public function MediaEvent(pType:String,pPosition:Number=0,pDuration:Number=0,pWidth:Number=0,pHeight:Number=0,pBubbles:Boolean=false,pCancelable:Boolean=false) {
			super(pType, pBubbles, pCancelable);
			_position = pPosition;
			_duration = pDuration;
			_width = pWidth;
			_height = pHeight;
		}
		
		override public function clone():Event {
			return new MediaEvent(type,_position,_duration,_width,_height,bubbles,cancelable);
		}
		
		public function get width():Number {
			return _width;
		}
		
		public function get height():Number {
			return _height;
		}
		
		public function get position():Number {
			return _position;
		}
		
		public function get duration():Number {
			return _duration;
		}
	}
	
}